import gameMechanics.Player;


public class Turn {
	private int action;
	private int raise_amount;
	private Player player;
	private int playerBankRoll;
	
	public Turn(Player p){
		this.player = p;
		player.HasTurn();
		action = 0;
		playerBankRoll = player.getBankRoll();
	}
	public void Check(){
		setTurnAction(1);
		endTurn();
	}
	public int Bid(int amount){
		setTurnAction(2);
		playerBankRoll -= amount;
		player.setBankRoll(playerBankRoll);
		endTurn();
		return amount;
	}
	public int Raise(){
		setTurnAction(3);
		playerBankRoll -= raise_amount;
		player.setBankRoll(playerBankRoll);
		endTurn();
		return raise_amount;
	}
	
	public void Call(){
		setTurnAction(4);
	}
	
	public void setTurnAction(int actionInteger){
		action = actionInteger;
	}
	public int getTurnAction(){
		return this.action;
	}
	private void endTurn() {
		player.HasTurn();
	}
}
